package homework;

public class Test01_reverse {
    public static void main(String[] args) {
        //将字符串翻转 abc->cba
        String a = "abc";
        //反向遍历 再依次加入
        String b = "";
        for(int i=a.length()-1;i>=0;i--){
            b+=a.charAt(i);
        }
        System.out.println(b);
        //将单词翻转 i am a student -> student a am i
    }
}
